'use strict'
const path = require('path')
module.exports = {
  dev: {
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {
      '/api/sys/auth/file/ueditor/upload': {
        target: 'http://127.0.0.1:8080', // 你接口的域名  http://172.00.61.243:8082
        //secure: false,      // 如果是https接口，需要配置这个参数
        changeOrigin: true,     // 如果接口跨域，需要进行这个参数配置
        pathRewrite: {
          '^/api/sys/auth/file/ueditor/upload': ''
        }
      }
    },
    // 各种开发服务器设置
    host: '0.0.0.0', // 可以被process.env.HOST覆盖
    port: 9529, // 可以通过process.env.PORT覆盖。如果使用端口，将确定一个免费端口
    autoOpenBrowser: false,
    errorOverlay: true,
    notifyOnErrors: true,
    poll: false,
    useEslint: true,
    showEslintErrorsInOverlay: false,

    /**
     * Source Maps
     */
    devtool: 'cheap-source-map',
    cacheBusting: true,
    cssSourceMap: true
  },

  build: {
    index: path.resolve(__dirname, '../dist/index.html'),
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    /**
     * Source Maps
     */
    productionSourceMap: true,
    devtool: '#source-map',
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report
  }
}
